{"text_format":"1","workbook":"xlsx","n_sheets":8,"sheets":["Control","Inventory","Call Map","Keywords","Events","Documentation","Change History","Debug Log"],"not_rendered":{"charts":0,"images":1,"macros":1,"external_links":0,"defined_names":5,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Control","index":0,"n_rows":0,"n_cols":0,"rows_kept":0,"cut":false,"hidden":false,"merged":[]}

{"sheet":"Inventory","index":1,"n_rows":4,"n_cols":10,"rows_kept":4,"cut":false,"hidden":false,"merged":[]}
[]
[null,"Module Name","Module Type","Tab Name (Worksheets)"]
[null,null,"Proc Visibility","Proc Type","Proc Name","Lines of Code"]
[null,null,null,"Variable Declare","Variable Name","Variable Type /User-Defined Type /Enum","Array Dimensions/ Const Value","Internal References","External References (Modules)","Remarks"]

{"sheet":"Call Map","index":2,"n_rows":3,"n_cols":6,"rows_kept":3,"cut":false,"hidden":false,"merged":[]}
[null,"Module","Module Type"]
[null,null,"Procedure","Proc Type"]
[null,null,null,"Relation","Module","Procedure"]

{"sheet":"Keywords","index":3,"n_rows":136,"n_cols":2,"rows_kept":136,"cut":false,"hidden":true,"merged":[]}
["Reserved Words\n\nThese are reserved exclusively for VBA and may not be used as names in code. If used they will cause a compile error.","Predefined Functions or Objects\n\nThese may be used in code but will hide the predefined functions or objects."]
["Abs","AppActivate"]
["Array","Application"]
["As","Asc"]
["Boolean","Atn"]
["Byte","Base"]
["Call","Beep"]
["Case","ChDir"]
["CBool","ChDrive"]
["CByte","Choose"]
["CCur","Chr"]
["CDate","Collection"]
["CDbl","Command"]
["CDec","Compare"]
["CInt","Cos"]
["CLng","CreateObject"]
["CLngLng","CurDir"]
["CLngPtr","Data"]
["Close","DateAdd"]
["Const","DateDiff"]
["CSng","DatePart"]
["CStr","DateSerial"]
["Currency","DateValue"]
["Cvar","Day"]
["CVErr","DDB"]
["Date","DefBool"]
["Decimal","DefByte"]
["Do","DefCur"]
["DoEvents","DefDate"]
["Double","DefDbl"]
["Each","DefDec"]
["Else","DefInt"]
["End","DefLng"]
["Erase","DefLngLng"]
["Exit","DefLngPtr"]
["False","DefObj"]
["Fix","DefSng"]
["For","DefStr"]
["Function","DefVar"]
["Get","DeleteSetting"]
["GoSub","Dictionary"]
["GoTo","Dir"]
["If","Environ"]
["In","EOF"]
["Input","Err"]
["Int","Error"]
["Integer","Exp"]
["LBound","Explicit"]
["Len","FileAttr"]
["Let","FileCopy"]
["Lock","FileDateTime"]
["Long","FileLen"]
["LongLong","Format"]
["LongPtr","FreeFile"]
["Loop","FV"]
["LSet","GetAllSettings"]
["Me","GetAttr"]
["New","GetObject"]
["Next","GetSetting"]
["Object","Hex"]
["On","Hour"]
["Open","InStr"]
["Option","IPmt"]
["Print","IRR"]
["Private","IsArray"]
["Public","IsDate"]
["Put","IsEmpty"]
["Re","IsError"]
["Resume","IsMissing"]
["Return","IsNull"]
["Rset","IsNumeric"]
["Seek","IsObject"]
["Select","Kill"]
["Set","LCase"]
["Sgn","Left"]
["Single","Line"]
["Spc","Loc"]
["Static","LOF"]
["Stop","Log"]
["String","LTrim"]
["Sub","Mid"]
["Tab","Minute"]
["Then","MIRR"]
["To","MkDir"]
["True","Module"]
["Type","Month"]
["UBound","Name"]
["Unlock","Now"]
["Variant","NPer"]
["Wend","NPV"]
["While","Oct"]
["With","Pmt"]
["Write","PPmt"]
[null,"Property"]
[null,"PV"]
[null,"QBColor"]
[null,"Raise"]
[null,"Randomize"]
[null,"Rate"]
[null,"Reset"]
[null,"RGB"]
[null,"Right"]
[null,"RmDir"]
[null,"Rnd"]
[null,"RTrim"]
[null,"SaveSetting"]
[null,"Second"]
[null,"SendKeys"]
[null,"SetAttr"]
[null,"Shell"]
[null,"Sin"]
[null,"SLN"]
[null,"Space"]
[null,"Split"]
[null,"Sqr"]
[null,"Str"]
[null,"StrComp"]
[null,"StrConv"]
[null,"Switch"]
[null,"SYD"]
[null,"Tan"]
[null,"Time"]
[null,"Timer"]
[null,"TimeSerial"]
[null,"TimeValue"]
[null,"Trim"]
[null,"TypeName"]
[null,"Ucase"]
[null,"Val"]
[null,"VarType"]
[null,"VBComponent"]
[null,"VBIDE"]
[null,"Weekday"]
[null,"Width"]
[null,"Workbook"]
[null,"Year"]

{"sheet":"Events","index":4,"n_rows":26,"n_cols":1,"rows_kept":26,"cut":false,"hidden":true,"merged":[]}
["Activate"]
["AddControl"]
["BeforeDragOver"]
["BeforeDropOrPaste"]
["BeforeUpdate"]
["Change"]
["Click"]
["DblClick"]
["Deactivate"]
["Enter"]
["Error"]
["Exit"]
["Initialize"]
["KeyDown"]
["KeyPress"]
["KeyUp"]
["Layout"]
["MouseDown"]
["MouseMove"]
["MouseUp"]
["QueryClose"]
["RemoveControl"]
["Resize"]
["Scroll"]
["Terminate"]
["Zoom"]

{"sheet":"Documentation","index":5,"n_rows":71,"n_cols":2,"rows_kept":71,"cut":false,"hidden":false,"merged":[]}
[]
[null,"Summary"]
[null,"This tool scans the code of a VBA project and provides an analysis of the code structure and flags some types of potential trouble spots."]
[]
[null,"Outputs"]
[null,"It generates two reports:"]
[]
[null,"Inventory"]
[null,"A hierarchical inventory of:"]
[null,"Modules"]
[null,"Module-level variables"]
[null,"Subs/Functions/Class Properties, with counts of lines of code*"]
[null,"Variables/constants, including a flag for unused variables/constants"]
[]
[null,"*Lines of code is physical, nonblank, non-comment lines of code."]
[null,"If multiple physical lines are split using a continuation character (_) they are counted as one line"]
[null,"If a single physical line has multiple statements by using a split character (:) they are counted as multiple lines"]
[]
[null,"Call Map"]
[null,"A catalog of all Subs/Functions/Class Properties and what other Subs or Functions they call, and are called by."]
[null,"No capabilty exists at this time to determine the source of calls to Class Properties so \"Called By\" for Class Properties is not listed."]
[]
[null,"It includes these hidden sheets:"]
[null,"Keywords"]
[null,"A hidden sheet with a list of language keywords, which are ignored when scanning for variable or procedure names"]
[null,"Events"]
[null,"A hidden sheet with a list of ActiveX control events, so they will not be flagged as \"Not Called\" if not explicitly called in code"]
[]
[null,"Documentation for VBA developers"]
[]
[null," The strategy is to parse the code and build a hierarchical model of the code, then dump the model to the reports"]
[]
[null," The model is:"]
[]
[null,"ModuleInventory - declared as Public in module Main. This is a global object that is a Scripting Dictionary. Each element of the dictionary is a ModuleMetadata object."]
[null,"ModuleMetadata - a class that describes a module."]
[null,"VarDict - a dictionary of Variable objects representing the variables declared at the module level"]
[null,"ProcMetadata - a class that describes a procedure (Sub, Function, Get/Let/Set Class Property)"]
[null,"CallsDict - a dictionary of procedures that this procedure calls"]
[null,"CalledByDict - a dictionary of procedures that call this procedure"]
[]
[null," This project has a debug logging facility. This facility is controlled by compiler directives. To control the level of debug logging,  use the compiler variables below. If the value is 0, the switch is off, otherwise its on."]
[]
[null," DebugLogging: Turn debug logging on. If this bit is not on, there will be no logging regardless of other bits"]
[null," DebugTrace: Log a trace of procedure/function calls"]
[null," DebugScreen: Leave screen updating on"]
[null," DebugKeyEvents: Log key events in the code (programmers discretion:"]
[null," DebugDoEvents: Activate DoEvents statements placed in strategic places for debugging, usually inside loops"]
[null," DebugErrors: Log unexpected errors"]
[]
[null,"Known limitations"]
[null,"The analysis is done by lexical parsing of language elements. It is not a full grammatical parse of language syntax.  Therefore there are some limitations:"]
[]
[null,"This analysis cannot reliably analyze code with compiler errors. The parsing is not grammatical so it cannot detect compiler errors, and code with invalid syntax will confuse the parsing algorithms. For best results run this analysis on code that compiles without errors."]
[]
[null,"When a Class Property is referenced in the code, the parsers cannot determine the Class of the instantiated referencing object,  so Class Properties do not have cross-reference entries for Calls/Called By."]
[]
[null,"It is recommended that all modules use Option Explicit. This analysis will not identify the usage of undeclared variables. If you use Option Explicit then the compiler will do that automatically and reliably."]
[]
[null,"If a procedure calls a procedure that is defined in another sheet module, and uses a With reference to refer to that sheet module, the procedure call may not be associated with that module (a With cannot be used to qualify a Standard module procedure). However, if it is recognized as a procedure call, then all modules will be searched."]
[]
[null," With Sheet1"]
[null,"    .SampleSub A:=1, B:=2"]
[]
[null,"In this example the procedure SampleSub will not be recognized as a Sub within module Sheet1 by the parser, but it will look in all modules for a public Sub called SampleSub to see if it can resolve the call. This will work in all situations except where there is a call to a non-existent Sub, or more than one Sub with the same name. In that case the parser cannot determine which module is supposed to contain the missing sub. However, in such a case, that code should give a compile error."]
[]
[]
[]
[]
[null,"           "]
[null,"           "]

{"sheet":"Change History","index":6,"n_rows":2,"n_cols":3,"rows_kept":2,"cut":false,"hidden":false,"merged":[]}
["Version","Date","Description"]
["0.1","2022-02-18","Beta test version released to excelforum.com"]

{"sheet":"Debug Log","index":7,"n_rows":0,"n_cols":0,"rows_kept":0,"cut":false,"hidden":true,"merged":[]}